/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.alag.ci.blog.search.Impl;
import java.util.*;
import com.alag.ci.blog.search.BlogQueryParameter;

/**
 *
 * @author Justina
 */
public class BlogQueryParameterImpl implements BlogQueryParameter {
    
    private Map<QueryParameter, String> params = null;
    private QueryType queryType = null;
    private String methodUrl = null;
    
    public BlogQueryParameterImpl(QueryType queryType, String methodUrl) {
        this.queryType = queryType;
        this.methodUrl = methodUrl;
    }

    public String getParameter(QueryParameter param) {
        return this.params.get(param);
    }

    public void setParameter(QueryParameter param, String value) {
        this.params.put(param, value);
    }

    public Collection<QueryParameter> getAllParameters() {
        Collection<QueryParameter> l = new ArrayList<QueryParameter>();
        for (QueryParameter param: params.keySet()) {
            l.add(param);
        }
        return l;
    }

    public QueryType getQueryType() {
        return this.queryType;
    }

    public String getMethodUrl() {
        return this.methodUrl;
    }    
    
}
